﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductType.aspx.cs" Inherits="FeiHongWeb.Admin.ProductType" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Styles/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <table class="gv_css" cellspacing="1" cellpadding="3" width="96%" align="center">
        <tr>
            <td class="UserTableRow1" align="right" width="33%">
                <span style="color: red">*</span>产品类别(中文)：
            </td>
            <td class="UserTableRow1" width="67%">
                <asp:TextBox ID="txt_type" runat="server" ValidationGroup="name"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_type"
                    Display="Dynamic" ErrorMessage="产品类别(中文)不能为空！" ValidationGroup="name" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="UserTableRow2" align="right" width="33%">
                <span style="color: red">*</span>产品类别(English)：
            </td>
            <td class="UserTableRow2" width="67%">
                <asp:TextBox ID="txt_type2" runat="server" ValidationGroup="name"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_type2"
                    Display="Dynamic" ErrorMessage="产品类别(English)不能为空！" ValidationGroup="name" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="UserTableRow2" align="right" width="33%">
                <span style="color: red">*</span>大类：
            </td>
            <td class="UserTableRow2" width="67%">
                <asp:DropDownList ID="ddl_type" runat="server">
                    <asp:ListItem Value="1">设备</asp:ListItem>
                    <asp:ListItem Value="2">不粘锅</asp:ListItem>
                    <asp:ListItem Value="3">铝板</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="UserTableRow2" width="33%">
            </td>
            <td class="UserTableRow2" width="67%">
                <asp:Button ID="btn_Add" runat="server" Text="增加" OnClick="btn_Add_Click" ValidationGroup="name" />
                &nbsp;&nbsp;
                <asp:Button ID="btn_return" runat="server" Text="清空" OnClick="btn_return_Click" CausesValidation="False" />
            </td>
        </tr>
    </table>
    <br>
        <table class="gv_css" cellspacing="1" cellpadding="3" width="96%" align="center">
            <tr>
                <td class="UserTableRow1">
                    <asp:GridView ID="gv_type" runat="server" Width="100%" AutoGenerateColumns="False"
                        OnRowCommand="gv_type_RowCommand">
                        <RowStyle CssClass="row" />
                        <AlternatingRowStyle CssClass="alterRow" />
                        <Columns>
                            <asp:TemplateField HeaderText="编号">
                                <ItemTemplate>
                                    <%#Eval("Id")%>
                                </ItemTemplate>
                                <HeaderStyle Width="15%"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="产品类别(中文)">
                                <ItemTemplate>
                                    <%#Eval("Name")%>
                                </ItemTemplate>
                                <HeaderStyle Width="30%"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="产品类别(English)">
                                <ItemTemplate>
                                    <%#Eval("EnName")%>
                                </ItemTemplate>
                                <HeaderStyle Width="30%"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Button ID="del" CommandName="del" CommandArgument='<%#Eval("Id")%>' runat="server"
                                        Text="删除" OnClientClick='return confirm("删除产品类别，将同时删除对应的产品信息，确认要删除吗？")' />
                                    <asp:Button ID="up" CommandName="up" CommandArgument='<%#Eval("Id")%>' runat="server"
                                        Text="修改" />
                                </ItemTemplate>
                                <HeaderStyle Width="25%"></HeaderStyle>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td>
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb"
                        CurrentPageIndex="1" EnableTheming="true" FirstPageText="首页" LastPageText="尾页"
                        NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged" PageSize="10" PrevPageText="上一页"
                        ShowPageIndexBox="Never" UrlPaging="true" Width="100%">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
    </br>
    </form>
</body>
</html>
